package io.renren.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 工位价签
 * 
 * @author 1
 * @email 1@2.com
 * @date 2021-11-19 11:03:23
 */
@Data
@TableName("seat_esl")
public class SeatEslEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	@TableId
	private Long id;
	/**
	 * 工位id
	 */
	private String seatId;
	/**
	 * 价签id
	 */
	private String eslId;
	/**
	 * 价签类型，fixed-固定工位；share-共享工位
	 */
	private String type;
	/**
	 * 创建时间
	 */
	private Date createTime;
	/**
	 * 更新时间
	 */
	private Date updateTime;
	/**
	 * 铭牌别名
	 */
	private String alias;

	public static SeatEslEntity convertFor(String seatId, String eslId, String type, String seatCode){
		SeatEslEntity seatEslEntity = new SeatEslEntity();
		seatEslEntity.setSeatId(seatId);
		seatEslEntity.setEslId(eslId);
		seatEslEntity.setType(type);
		seatEslEntity.setCreateTime(new Date());
		seatEslEntity.setUpdateTime(new Date());
		seatEslEntity.setAlias(seatCode);
		return seatEslEntity;
	}

}
